package at.fhooe.mc.master.clc.server.dataaccess;

public class ErrorUtil
{	
	public static final int EXCEPTION_ERROR = -1;
	
	public static final int NOT_IMPLEMENTED_ERROR = -2;
	
	public static final int NATIVE_DATASTORE_NOT_IMPLEMENTED = -3;
	
	public static final int NATIVE_DATASTORE_NO_KEY_SET = -4;
	
	public static final int DATASTORE_LOAD_ERROR = -5;
	
	public static String getErrorMessage(int errorCode)
	{
		switch (errorCode)
			{
			case NOT_IMPLEMENTED_ERROR:
				return "This feature is currently not implemented!";
			case NATIVE_DATASTORE_NOT_IMPLEMENTED:
				return "NativeDatastoreDAO: Implementation for a test class is missing!";
			case NATIVE_DATASTORE_NO_KEY_SET:
				return "Native Datastore DAO: Tried to delete entity that did not have a key.";
			case DATASTORE_LOAD_ERROR:
				return "Error loading from Datastore.";
			default:
				return "Some Error uccored (no error message defined for code " + errorCode + ")";
			}
	}
}
